import {
  AppstoreOutlined,
  MailOutlined,
  InboxOutlined,
  PieChartOutlined,
  DesktopOutlined
} from '@ant-design/icons-vue'
import { h } from 'vue'

/** Encoding **/
const supportEncoding = ['base64', 'base32', 'base58','hex']

const encodingChild: any = new Array(supportEncoding.length * 2)

for (let item of supportEncoding) {
  let objEncode = {
    key: item + 'encode',
    icon: () => h(PieChartOutlined),
    label: 'Encode' + item,
    title: 'Encode' + item,
    route: '/encoding/encode' + item,
    encode: item,
    method: 'encode'
  }
  let objDecode = {
    key: item + 'decode',
    icon: () => h(PieChartOutlined),
    label: 'Decode' + item,
    title: 'Decode' + item,
    route: '/encoding/decode' + item,
    encode: item,
    method: 'decode'
  }
  encodingChild.push(objEncode)
  encodingChild.push(objDecode)
}
encodingChild.push({
    key: 'QRCode',
    icon: () => h(PieChartOutlined),
    label: 'QRCode',
    title: 'QRCode',
    route: '/encoding/qrcode',
    encode: 'QRCode',
    method: 'encode'
})
/** Encoding **/

/** Programing **/
const programingChild: any = new Array(4)
programingChild.push({
    key: 'sql-pretty',
    label: 'SQL Pretty',
    title: 'SQL Pretty',
    route: '/program/sqlpretty'
})
programingChild.push({
  key: 'cryptosha',
  label: 'Crypto SHA',
  title: 'Crypto SHA',
  route: '/program/cryptosha'
})
programingChild.push({
  key: 'cryptohmac',
  label: 'Crypto HMAC',
  title: 'Crypto HMAC',
  route: '/program/cryptohmac'
})
programingChild.push({
  key: 'cryptoase',
  label: 'Ciphers AES',
  title: 'Ciphers AES',
  route: '/program/cryptoaes'
})
programingChild.push({
  key: 'crypto3dse',
  label: 'Ciphers 3DES',
  title: 'Ciphers 3DES',
  route: '/program/crypto3des'
})
programingChild.push({
  key: 'pemparser',
  label: 'Pem Parser',
  title: 'Pem Parser',
  route: '/program/pemparser'
})
programingChild.push({
  key: 'pgpkeygen',
  label: 'PGP Key Generator',
  title: 'PGP Key Generator',
  route: '/program/pgpkeygen'
})
programingChild.push({
  key: 'pwdgen',
  label: 'Password Generator',
  title: 'Password Generator',
  route: '/program/pwdgen'
})

/** Programing **/
const menuData = [
  {
    key: 'encoding',
    icon: () => h(PieChartOutlined),
    label: 'Encoding',
    title: 'Encoding',
    children: encodingChild
  },
  {
    key: 'programing',
    icon: () => h(MailOutlined),
    label: 'Programing',
    title: 'Programing',
    children: programingChild
  },
  {
    key: 'sub2',
    icon: () => h(AppstoreOutlined),
    label: 'Navigation Two',
    title: 'Navigation Two',
    children: [
      {
        key: '9',
        label: 'Option 9',
        title: 'Option 9'
      },
      {
        key: '10',
        label: 'Option 10',
        title: 'Option 10'
      },
      {
        key: 'sub3',
        label: 'Submenu',
        title: 'Submenu',
        children: [
          {
            key: '11',
            label: 'Option 11',
            title: 'Option 11'
          },
          {
            key: '12',
            label: 'Option 12',
            title: 'Option 12'
          }
        ]
      }
    ]
  }
]

export { menuData,encodingChild }
